package com.item.redisConfig;


import com.item.constant.RedisMobileMessageConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;


@RestController
public class Redisconfig {

    @Autowired
    public RedisTemplate redisTemplate;

    @RequestMapping(value = "/redis/api/conf")
    public String redisApiConf() {
        redisTemplate.opsForValue().set("13923815937", 6666, 60, TimeUnit.SECONDS);
        redisTemplate.opsForValue().set("13923815932", 7777, 60, TimeUnit.SECONDS);
        redisTemplate.opsForValue().set("13923815933", 8888, 60, TimeUnit.SECONDS);
        redisTemplate.opsForValue().set("13923815934", 9999, 60, TimeUnit.SECONDS);
        redisTemplate.opsForValue().set("13923815935", 5555, 60, TimeUnit.SECONDS);
        return "redis配置";
    }
}
